{% extends "myadmin/base.html" %}

{% block main_body %}
<!-- Content Header (Page header) -->
<section class="content-header">
  <h1>
    员工管理
    <small>订餐系统后台管理</small>
  </h1>
  <ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li class="active">员工管理</li>
  </ol>
</section>

<!-- Main content -->
<section class="content container-fluid">

  <div class="row">
    <div class="col-xs-12">
      <div class="box">
        <div class="box-header">
          <h2 class="box-title"> <span class="glyphicon glyphicon-calendar" aria-hidden="true">编辑员工信息</h2>
        </div>
        <!-- /.box-header -->
        <!-- form start -->
        <form class="form-horizontal" action="{% url 'myadmin_user_update' user.id %}" method="post">
          {% csrf_token %}

          <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">员工账号：</label>
            <div class="col-sm-4">
              <input type="text"  readonly name="username" value="{{user.username}}" class="form-control" id="inputEmail3" placeholder="员工账号"/>
            </div>
          </div>

          <div class="form-group">
            <label for="inputEmail4" class="col-sm-2 control-label">员工昵称：</label>
            <div class="col-sm-4">
              <input type="text" name="nickname" value="{{user.nickname}}"  class="form-control" id="inputEmail4" placeholder="员工昵称"/>
            </div>
          </div>


          <div class="form-group" style="padding-top: 5px">
            <label for="inputEmail3" class="col-sm-2 control-label">添加时间</label>

            <div class="col-sm-4" style="padding-top: 5px">
              {{user.create_at|date:'Y-m-d H:i:s'}}
            </div>
          </div>

          <div class="form-group" style="padding-top: 5px">
            <label for="inputEmail3" class="col-sm-2 control-label">修改时间</label>

            <div class="col-sm-4" style="padding-top: 5px">
              {{user.update_at|date:'Y-m-d H:i:s'}}
            </div>
          </div>

          <div class="form-group">
            <label for="inputEmail4" class="col-sm-2 control-label">状态</label>
            <div class="col-sm-4">
              &nbsp;&nbsp;&nbsp;
              <input type="radio" name="status" class="input-xlarge" value="1"
              {% if user.status == 1 %}checked{% endif %}/>正常
              &nbsp;&nbsp;&nbsp;
              <input type="radio" name="status" class="input-xlarge" value="2"
                     {% if user.status == 2 %}checked{% endif %}/>禁用
              &nbsp;&nbsp;&nbsp;
              <input type="radio" name="status" class="input-xlarge" value="6"
                     {% if user.status == 6 %}checked{% endif %}/>管理员
            </div>
          </div>


          <!-- /.box-body -->
          <div class="box-footer">
            <div class="col-sm-offset-2 col-sm-10">
              <button type="submit" class="btn btn-primary">提交</button> &nbsp;
              <button type="submit" class="btn btn-default">重置</button>
              <div class="col-sm-offset-2 col-sm-10">
              </div>
              <!-- /.box-footer -->
        </form>
      </div>
      <!-- /.box -->
    </div>
  </div>

</section>
<!-- /.content -->

{% endblock %}